<template>
  <Layout desc="封装进度执行动画">
    <div class="text-center mt-60">
      <div class="text-3xl mb-5">{{ num }}</div>
      <el-button @click="start" type="primary">开始执行动画</el-button>
    </div>
  </Layout>
</template>

<script setup lang="ts">
import { animation } from '@/utils/animation'

const num = ref(0)
const start = () => {
  animation(num.value, 100, 3000, val => (num.value = val))
}
</script>

<style scoped lang="scss"></style>
